package pe.com.bbva.efcap.servidor.servicio.impl;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import pe.com.bbva.efcap.servidor.dao.SimulacionDAO;
import pe.com.bbva.efcap.servidor.modelo.entidad.Simulacion;
import pe.com.bbva.efcap.servidor.servicio.SimulacionService;

@Service
@Transactional(readOnly = true)
public class SimulacionServiceImpl implements SimulacionService{

	@Autowired
	private SimulacionDAO simulacionDAO;

	private static final Logger LOGGER = LoggerFactory.getLogger(SimulacionServiceImpl.class);

	@Override
	@Transactional(readOnly = false)
	public long guardarSimulacion(Simulacion simulacion) {
		return (Long)simulacionDAO.guardar(simulacion);
	}
	
	@Override
	public Simulacion obtenerSimulacionPorId(long idSimulacion){
		return simulacionDAO.buscarPorId(idSimulacion);
	}
}
